#include<stdio.h>
#include<assert.h>


char* strcpy(char* src)
{
    int i = 0;
    int length = 0;
    char* dest = NULL;

    assert(src != NULL);
    while (src[length++] != '\0')
    {
        NULL;
    }
    dest = malloc(length * sizeof(char));
    for (i = 0; i < length; i++)
    {
        dest[i] = src[i];
    }
    dest[length - 1] = '\0';
    return dest;
}

int main(void)
{
    char a[6] = {'h', 'e', 'l', 'l', 'o', '\0'};
    char* b = NULL;
    b = strcpy(a);
    free(b);
    return 0;
}